package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.math.BigDecimal;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.SaleRebatesRecordExample.E_CALCULATION_MONTH;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_COMPANY_ID;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_COMPANY_NAME;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_DIVIDED_PROPORTION;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_IS_NEW;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_PROPORTION;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_REBATES_AMOUNT;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_REBATES_RULES_ID;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_REMARK;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_RULES_NAME;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_SALE_NAME;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_SALE_USER_ID;
import static org.jsola.hr.example.SaleRebatesRecordExample.E_SERVER_COST;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_CALCULATION_MONTH_MAX;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_CALCULATION_MONTH_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_COMPANY_NAME_MAX;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_COMPANY_NAME_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_REBATES_RULES_ID_MAX;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_REBATES_RULES_ID_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_REMARK_MAX;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_RULES_NAME_MAX;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_RULES_NAME_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_SALE_NAME_MAX;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_SALE_NAME_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_SALE_USER_ID_MAX;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_SALE_USER_ID_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRecordExample.M_SERVER_COST_NOT_NULL;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_CALCULATION_MONTH;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_COMPANY_ID;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_COMPANY_NAME;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_DIVIDED_PROPORTION;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_IS_NEW;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_PROPORTION;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_REBATES_AMOUNT;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_REBATES_RULES_ID;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_REMARK;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_RULES_NAME;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_SALE_NAME;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_SALE_USER_ID;
import static org.jsola.hr.example.SaleRebatesRecordExample.N_SERVER_COST;

/**
 * 返费记录
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【返费记录】的参数")
@Data
public class SaleRebatesRecordAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_SALE_USER_ID, example = E_SALE_USER_ID, required = true)
    @NotNull(message = M_SALE_USER_ID_NOT_NULL)
    @Length(max = 32, message = M_SALE_USER_ID_MAX)
    private String saleUserId;

    @ApiModelProperty(notes = N_SALE_NAME, example = E_SALE_NAME, required = true)
    @NotNull(message = M_SALE_NAME_NOT_NULL)
    @Length(max = 50, message = M_SALE_NAME_MAX)
    private String saleName;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_COMPANY_NAME, example = E_COMPANY_NAME, required = true)
    @NotNull(message = M_COMPANY_NAME_NOT_NULL)
    @Length(max = 50, message = M_COMPANY_NAME_MAX)
    private String companyName;

    @ApiModelProperty(notes = N_CALCULATION_MONTH, example = E_CALCULATION_MONTH, required = true)
    @NotNull(message = M_CALCULATION_MONTH_NOT_NULL)
    @Length(max = 50, message = M_CALCULATION_MONTH_MAX)
    private String calculationMonth;

    @ApiModelProperty(notes = N_SERVER_COST, example = E_SERVER_COST, required = true)
    @NotNull(message = M_SERVER_COST_NOT_NULL)
    private BigDecimal serverCost;

    @ApiModelProperty(notes = N_IS_NEW, example = E_IS_NEW)
    private Boolean isNew;

    @ApiModelProperty(notes = N_REBATES_RULES_ID, example = E_REBATES_RULES_ID, required = true)
    @NotNull(message = M_REBATES_RULES_ID_NOT_NULL)
    @Length(max = 32, message = M_REBATES_RULES_ID_MAX)
    private String rebatesRulesId;

    @ApiModelProperty(notes = N_RULES_NAME, example = E_RULES_NAME, required = true)
    @NotNull(message = M_RULES_NAME_NOT_NULL)
    @Length(max = 50, message = M_RULES_NAME_MAX)
    private String rulesName;

    @ApiModelProperty(notes = N_PROPORTION, example = E_PROPORTION)
    private BigDecimal proportion;

    @ApiModelProperty(notes = N_DIVIDED_PROPORTION, example = E_DIVIDED_PROPORTION)
    private BigDecimal dividedProportion;

    @ApiModelProperty(notes = N_REBATES_AMOUNT, example = E_REBATES_AMOUNT)
    private BigDecimal rebatesAmount;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 255, message = M_REMARK_MAX)
    private String remark;


}

